<html>
<head>
    <title>数组练习</title>
</head>
<body>
    <script>
        var Arr=new Array(1,2,3,4,5,6,7,8,9,10);
        num =Arr.length;
        var sum=0;
        for(var i=0;i<num;i++){
            sum=sum+Arr[i];
        }
        var avg=sum/num;
        document.write(sum.toFixed(2)+"<br/>");
    </script>
</body>
</html>